# coding:utf-8

from marshmallow import fields

from ..extensions import ma
from .utils import EmptyStrValidator


class UserExhibitionSchema(ma.Schema):
    """
    created by chenhj at 2017/8/14

    """
    mobile = fields.Str(required=True, error_messages={
        'required': '手机号不合法'
    }, validate=EmptyStrValidator(error='手机号不合法'))
    nickname = fields.Str(required=True, error_messages={
        'required': '昵称不合法'
    }, validate=EmptyStrValidator(error='昵称不合法'))

user_exhibition_schema = UserExhibitionSchema()
